#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
#include<math.h>
int main()
{
    int m;
    int n;
    int i = 0;
    int arr[5] = { 0 };
    int z = 0;
    scanf("%d %d", &m, &n);
    {
        for (i = m; i <= n; i++)
        {
            int middle = i;
            int sum = 0;
            while (middle)
            {
                sum += pow(middle % 10, 3);
                middle /= 10;
            }
            if (sum == i)
            {
                arr[z] = sum;
                z++;
            }
        }
        if (z == 0)
        {
            printf("no\n");
        }
        else {
            {
                for (i = 0; i < z; i++)
                {
                    printf("%d ", arr[i]);
                }
            }
        }
    }
	return 0;
}